//
//  Seller_Stock_SubsVC.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/5.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Seller_Stock_SubsVC.h"
#import "Seller_StockTableViewCell.h"

@interface Seller_Stock_SubsVC ()<BaseTableViewCelldelegate>

@end

@implementation Seller_Stock_SubsVC
-(void)configOwnViews{
    
    [super configOwnViews];
    self.tableView.frame=CGRectMake(0, 0, kMainScreenWidth, KcontentViewHeight-35-KTabBarHeight);

    [self tablePullupHeaderRefresh:^{
       
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            
            [self tableViewEndRefresh];
            
        });
        
    }];
    
    [self tablePullDownFootRefresh:^{
        
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            
            [self tableViewEndRefresh];
            
        });
        
    }];
}
-(void)registerCellClass{
    
    [super registerCellClass];
    
    [self.tableView registerClass:[Seller_StockTableViewCell class ] forCellReuseIdentifier:[Seller_StockTableViewCell cellIdentifier]];
    
}
#pragma mark  UITableViewDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 20;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    Seller_StockTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:[Seller_StockTableViewCell cellIdentifier] forIndexPath:indexPath];
    cell.delegate=self;
    
    if (_VcType==  Stock_SubsVChaveType) {
        
        [cell configTableView:tableView withModel:nil withVcType:StockTableViewSendCellType];

    }else{
        
        [cell configTableView:tableView withModel:nil withVcType:StockTableViewNoCellType];

    }
    return cell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 125;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
}
-(void)clickTableView:(BaseTableViewCell*)tableCell withtouchView:(UIView *)touchView    EventType:(TableClickEvent)eventValue{
    
    
}

@end
